<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>

        <!-- blueprint CSS framework -->
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
        <!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />


        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/layout-default-latest.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/jquery.scrollpane.css" />


        <style type="text/css">
            html, body {
                background:	#666;
                width:		100%;
                height:		100%;					
                padding:	0;
                margin:		0;
                overflow:	auto; /* when page gets too small */
            }
            #container {
                /*                background:	#999;
                                height:		95%;
                                margin:		0 auto;
                                width:		100%;
                                max-width:	900px;
                                min-width:	700px;
                                _width:		700px;  min-width for IE6 
                
                                margin-top: 5px;
                                margin-bottom: 5px;
                                background: white;
                                border: 1px solid #121c28;*/
                border: medium none;
                height: 100%;
                margin: 0;
                overflow: hidden;
                padding: 0;
                position: relative;
            }

            .pane {
                display:	none; /* will appear when layout inits */
                background:     #D5EADE;
            }

        </style>


        <style type="text/css">

            .ui-layout-west ,
            .ui-layout-east ,
            .ui-layout-center {
                padding:		0;
                /*                padding-right: 15px;*/
                background-color: white;
            }
            .ui-layout-north{
                padding-right: 15px;
                /*                background: url("/yiilibrary/themes/cp-1/hornavimages/topnav_bg.gif") repeat-x scroll 0 0 transparent; */
                background: #823681;
            }
            .ui-layout-west{
                /*                background-color: #123737;*/
                background-color: #EEEEFF;                
            }
            h3 ,
            p.footer {
                font-size:		1.2em;
                background:		#F6F6F6;
                border-bottom:	1px solid #BBB;
                padding:		5px 15px;
                margin:			0;
            }
            p.footer {
                font-size:		1em;
                border-top:		1px solid #BBB;
                border-bottom:	0;
            }
            .ui-layout-east ,
            .ui-layout-content {
                padding:		0;
                overflow:		hidden !important; /* prevent scrollbars auto-added by Layout */
            }
            .scrolling-content {
                height:			100%;
                padding:		0 15px 10px; /* extra paddingTop being added by scrollpane? */
                padding-right:	0; /* for pseudo-scrollbar on right */
            }


            .jScrollPaneTrack {
                background: url(<?php echo Yii::app()->theme->baseUrl; ?>/images/osx_track.gif) repeat-y;
            }
            .jScrollPaneDrag {
                background: url(<?php echo Yii::app()->theme->baseUrl; ?>/images/osx_drag_middle.gif) repeat-y;
            }
            .jScrollPaneDragTop {
                background: url(<?php echo Yii::app()->theme->baseUrl; ?>/images/osx_drag_top.gif) no-repeat;
                height: 6px;
            }
            .jScrollPaneDragBottom {
                background: url(<?php echo Yii::app()->theme->baseUrl; ?>/images/osx_drag_bottom.gif) no-repeat;
                height: 7px;
            }
            a.jScrollArrowUp {
                height: 24px;
                background: url(<?php echo Yii::app()->theme->baseUrl; ?>/images/osx_arrow_up.png) no-repeat 0 -30px;
            }
            a.jScrollArrowUp:hover {
                background-position: 0 0;
            }
            a.jScrollArrowDown {
                height: 24px;
                background: url(<?php echo Yii::app()->theme->baseUrl; ?>/images/osx_arrow_down.png) no-repeat 0 -30px;
            }
            a.jScrollArrowDown:hover {
                background-position: 0 0;
            }
        </style>

        <?php Yii::app()->clientScript->registerCoreScript('jquery') ?>                
<!--	<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-latest.js"></script>-->
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-ui-latest.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.layout-latest.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.mousewheel.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.scrollpane.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/debug.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.ba-resize.min.js"></script>

        <script type="text/javascript">

            function initPaneScrollbar ( pane, $Pane ) {
                $Pane.find("div.scrolling-content:first")
                // re/init the pseudo-scrollbar
                .jScrollPane({
                    scrollbarMargin:	15	// spacing between text and scrollbar
                    ,	scrollbarWidth:		15
                    ,	arrowSize:			16
                    ,	showArrows:			true
                })
                // REMOVE the *fixed width & height* just set on jScrollPaneContainer
                .parent(".jScrollPaneContainer").css({
                    width:	'100%'
                    ,	height:	'100%'
                })
                ;
            };

            var myLayout	;

            $(document).ready(function () {

                myLayout = $('#container').layout({
                    //	need to re-init the scrollbar whenever the pane resizes
                    center__onresize:                           initPaneScrollbar
                    ,	west__onresize:				initPaneScrollbar
                    ,	east__onresize:				initPaneScrollbar
                    //	timing issue, so init scrolling AFTER init done (below)
                    ,	triggerEventsOnLoad:		false
                    //	live-resizing on all panes - not required
                    ,	resizeWhileDragging:		true
                    //	avoid re-initing scrollbars repeatedly while: resizeWhileDragging
                    //	sizing is much smoother, but scrollbar.height and text-width don't update until 'done'
                    ,	triggerEventsWhileDragging:	false
                    // enable state-managment for pane-size
                    ,	useStateCookie:				false
                    ,   north__spacing_open:	1                    
                    ,   south__spacing_open:	0                    
                    //                    ,   north__size: 50
                    ,   west__size: 250
                    ,   west__resizable: false
                    ,   north__resizable: false
                });

                // NOW init all scrollbars
                //                initPaneScrollbar( 'west', myLayout.panes.west );
                //                initPaneScrollbar( 'east', myLayout.panes.east );
                initPaneScrollbar( 'west', myLayout.panes.west);
                initPaneScrollbar( 'center', myLayout.panes.center );
                
                setTimeout( function() {
                    initPaneScrollbar( 'west', myLayout.panes.west);
                    //		jQuery('#loading_mask').hide();
                }, 200 );
                setTimeout( function() {
                    initPaneScrollbar( 'center', myLayout.panes.center );
                    //		jQuery('#loading_mask').hide();
                }, 200 );


                // Well, try this on for size!
                $("#unicorns").resize(function(e){
                    //                    alert('hii');
                    // do something when #unicorns element resizes
                });


            });
        </script>
        <script type="text/javascript">
            //settimeout for every element within div, solve scrollbar problem...
            $(document).ready(function() {
                //       $('#unicorns').bind('click dblclick mousedown mouseenter mouseleave', detectEvent);

                function detectEvent(e) {
                    setTimeout( function() {
                        initPaneScrollbar( 'center', myLayout.panes.center );
                        //                        initPaneScrollbar( 'west', myLayout.panes.west);
                        //		jQuery('#loading_mask').hide();
                    }, 200 );
            
                    //            alert('Current Event is: ' + e.type);
                }
        
                //                var parents = $("#unicorns").parents();
                //                for(var i = 0; i < parents.length; i++){
                //                    $(parents[i]).bind('click dblclick mousedown mouseenter mouseleave', detectEvent);
                //                }
        
            });
        </script>


        <!-- Hover Menu -->
        <script type="text/javascript"> 
            $(document).ready(function(){

                $("#mainmenu ul li ul").parent().append("<div></div>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
	
                $("#mainmenu ul div").click(function() { //When trigger is clicked...

		
                    //Following events are applied to the subnav itself (moving subnav up and down)
                    $(this).parent().find("ul").slideDown('slow').show(); //Drop down the subnav on click

                    $(this).parent().hover(function() {
                    }, function(){	
                        $(this).parent().find("ul").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
                    });

                    //Following events are applied to the trigger (Hover events for the trigger)
                }).hover(function() { 
                    //                    $(this).addClass("subhover"); //On hover over, add class "subhover"
                    //                    $(this).addClass("subhover"); //On hover over, add class "subhover"
                }, function(){	//On Hover Out
                    //                    $(this).removeClass("subhover"); //On hover out, remove class "subhover"
                    $(this).removeClass("subhover"); //On hover over, add class "subhover"
                });

            });
        </script>
        <style type="text/css">

            #mainmenu {
                margin: 0; padding: 0;
                font: 10px normal Arial, Helvetica, sans-serif;
            }
            #mainmenu ul {
                list-style: none;
                padding: 0 20px;
                margin: 0;
                float: left;
                width: 920px;
                /*                background: #222;*/
                font-size: 1.2em;
                /*                background: url(<?php echo Yii::app()->request->baseUrl; ?>/themes/cp-1/hornavimages/topnav_bg.gif) repeat-x;*/
            }
            #mainmenu ul li {
                float: left;
                margin: 0;	
                padding: 0 15px 0 0;
                position: relative; /*--Declare X and Y axis base--*/
            }

            #mainmenu ul li a{
                padding: 10px 5px;
                color: #fff;
                display: block;
                text-decoration: none;
                float: left;
            }
            #mainmenu ul li span{
                padding: 10px 5px;
                color: #fff;
                display: block;
                text-decoration: none;
                float: left;
            }
            #mainmenu ul li a:hover{
                background: url(<?php echo Yii::app()->request->baseUrl; ?>/themes/cp-1/hornavimages/topnav_hover.gif) no-repeat center top;
            }
            #mainmenu ul div { /*--Drop down trigger styles--*/
                width: 17px;
                height: 35px;
                float: left;
                background: url(<?php echo Yii::app()->request->baseUrl; ?>/themes/cp-1/hornavimages/subnav_btn.gif) no-repeat center top;
            }
            #mainmenu ul li div.subhover {background-position: center bottom; cursor: pointer;} /*--Hover effect for trigger--*/
            /*            #mainmenu ul li div.subhover {background-position: center bottom; cursor: pointer;} --Hover effect for trigger--*/
            #mainmenu ul li ul {
                list-style: none;
                position: absolute; /*--Important - Keeps subnav from affecting main navigation flow--*/
                left: 0; top: 35px;
                background: #333;
                margin: 0; padding: 0;
                display: none;
                float: left;
                width: 170px;
                -moz-border-radius-bottomleft: 5px;
                -moz-border-radius-bottomright: 5px;
                -webkit-border-bottom-left-radius: 5px;
                -webkit-border-bottom-right-radius: 5px;
                border: 1px solid #111;
            }
            #mainmenu ul li ul li{
                margin: 0; padding: 0;
                border-top: 1px solid #252525; /*--Create bevel effect--*/
                border-bottom: 1px solid #444; /*--Create bevel effect--*/
                clear: both;
                width: 170px;
            }
            #mainmenu ul li ul li a {
                float: left;
                width: 145px;
                background: #823681 url(<?php echo Yii::app()->request->baseUrl; ?>/themes/cp-1/hornavimages/dropdown_linkbg.gif) no-repeat 10px center;
                padding-left: 20px;
            }
            #mainmenu ul li ul li a:hover { /*--Hover effect for subnav links--*/
                background: #823681 url(<?php echo Yii::app()->request->baseUrl; ?>/themes/cp-1/hornavimages/dropdown_linkbg.gif) no-repeat 10px center; 
            }
            #header img {
                margin: 20px 0 10px;
            }

            /*            ul.operations li { color: #fff; list-style-type: square!important; }
                        ul.operations li a:hover {color: #EEEEFF;}
            
                        ul.operations a { 
                            color: #fff;                 
                            font: 13px normal Arial, Helvetica, sans-serif;
                            font-weight: bold;
                        }
                        .portlet-decoration{
                            color: #fff;
                            padding: 10px;
                            border-style: solid;
                        }            
            */

            .portlet
            {
                padding: 10px;
                width: 92%;
            }

            .portlet-decoration
            {
                padding: 3px 8px;
                /*                background: #B7D6E7;*/
                border: 1px solid;
                border-left: 5px solid #641b63;
                background: #823681;
            }

            .portlet-title
            {
                font-size: 12px;
                font-weight: bold;
                padding: 0;
                margin: 0;
                color: #298dcd;
                color: #EEEEFF;
                font-weight: bolder;
                font-size: 15px;
            }

            .portlet-content
            {
                font-size:0.9em;
                margin: 0 0 15px 0;
                padding: 5px 8px;
                /*                background:#EFFDFF;*/
                border: 1px solid;
            }

            .portlet-content ul
            {
                list-style-image:none;
                list-style-position:outside;
                list-style-type:none;
                margin: 0;
                padding: 0;
            }

            .portlet-content li
            {
                padding: 2px 0 4px 0px;
            }

            .operations
            {
                list-style-type: none;
                margin: 0;
                padding: 0;
            }

            .operations li
            {
                padding-bottom: 2px;
            }

            .operations li a
            {
                font: bold 12px Arial;
                color: #0066A4;
                color: #823681;
                display: block;
                padding: 2px 0 2px 8px;
                line-height: 15px;
                text-decoration: none;
            }

            .operations li a:visited
            {
                color: #0066A4;
                color: #823681;
            }

            .operations li a:hover
            {
                background: #80CFFF;
                background: #823681;
                color: white;
            }


            .grid-view table.items th{
                background: #823681!important;
            }
            .grid-view table.items tr.odd{
                background: none repeat scroll 0 0 #f7f7ff!important;
            }
            .grid-view table.items tr:hover{
                background: none repeat scroll 0 0 #f4e9f4;
            }

        </style>

        <!-- Hover Menu End -->
    </head>

    <body>
        <div id="container">

            <!--            <div class="ui-layout-north" onmouseover="myLayout.allowOverflow('north')" onmouseout="myLayout.resetOverflow(this)">-->
            <div style="padding-left: 100px;" class="ui-layout-north" onmouseover="myLayout.allowOverflow('north')" >
                <img src="<?php echo Yii::app()->request->baseUrl; ?>/themes/cp-1/images/looplogo.png"/>
            </div>

            <?php echo $content; ?>

            <div style="background: #EEEEFF;font-size: small;text-align: center;" class="ui-layout-south" onmouseover="myLayout.allowOverflow('north')" >
                <i>@ 2011 A.I.M.S.C. Disclaimer & Privacy Policy</i>
            </div>
        </div>
    </body>
</html>
